package net.zabuchy.issue.entity;

import java.io.Serializable;
import javax.persistence.*;


/**
 * The persistent class for the notifications database table.
 * 
 */
@Entity
@Table(name="notifications")
public class Notification implements Serializable {
	private static final long serialVersionUID = 1L;
	private int notificationId;
	private int userId;
	private Issue issue;

    public Notification() {
    }

	public Notification(int userId, Issue issue) {
		super();
		this.userId = userId;
		this.issue = issue;
	}

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name="NOTIFICATION_ID")
	public int getNotificationId() {
		return this.notificationId;
	}

	public void setNotificationId(int notificationId) {
		this.notificationId = notificationId;
	}

	@Column(name="USER_ID")
	public int getUserId() {
		return this.userId;
	}

	public void setUserId(int userId) {
		this.userId = userId;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "ISSUE_ID", nullable = false)
	public Issue getIssue() {
		return this.issue;
	}

	public void setIssue(Issue issue) {
		this.issue = issue;
	}
	
}